package com.skyvin.nreceipts.admin.service;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.skyvin.nreceipts.admin.mongorepository.RetailerTemplateRepository;
import com.skyvin.nreceipts.common.document.RetailerTemplate;

@Service
public class RetailerTemplateService {
	private static Logger logger = Logger.getLogger(RetailerTemplateService.class);
	
	@Autowired
	private RetailerTemplateRepository retailerTemplateRepository;
	
	@Transactional
	public RetailerTemplate save(RetailerTemplate retailerTemplate) {
		return retailerTemplateRepository.save(retailerTemplate);
	}

	@Transactional
	public void delete(String pid) {
		retailerTemplateRepository.delete(pid);		
	}
}
